package cn.edu.zjut.mina.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cn.edu.zjut.mina.service.IDepositService;
import cn.edu.zjut.mina.service.ILoginService;

@Controller
@RestController
@RequestMapping("/deposit")
public class DepositRoomCardAction {
	
	@Qualifier("depositService")
	@Autowired
	private IDepositService depositService;
	
	/**
	 * 房卡充值 + 推送
	 * @param unionid
	 * @param roomCardNum
	 * @return
	 */
	@RequestMapping(value="/depositroomcard", produces = "application/json;charset=UTF-8")
	public String depositRoomCard(@RequestParam("unionid")String unionid, @RequestParam("roomCardNum")int roomCardNum, @RequestParam("money")int money){
		return depositService.depositroomcard(unionid, roomCardNum, money);
	}
}
